Don't just conditionally set it on buttons.
y += default_border.top;
width -= default_border.left + default_border.right;
height -= default_border.top + default_border.bottom;
-
- gtk_style_context_add_class (context, GTK_STYLE_CLASS_DEFAULT);
}
else if (gtk_widget_get_can_default (widget))
{
_gtk_widget_set_has_default (GtkWidget *widget,
gboolean has_default)
{
+ GtkStyleContext *context;
+
widget->priv->has_default = has_default;
+
+ context = gtk_widget_get_style_context (widget);
+
+ if (has_default)
+ gtk_style_context_add_class (context, GTK_STYLE_CLASS_DEFAULT);
+ else
+ gtk_style_context_remove_class (context, GTK_STYLE_CLASS_DEFAULT);
}
/**